class PlatformDetector {
    static init() {
        document.addEventListener('DOMContentLoaded', function() {
            // 检测操作系统平台
            const isMac = process.platform === 'darwin';
            const isWindows = process.platform === 'win32';
            
            const titleBarLeft = document.getElementById('titleBarLeft');
            const windowControls = document.getElementById('windowControls');
            
            if (isMac) {
                // Mac系统：隐藏左侧标题和窗口控制按钮
                if (titleBarLeft) {
                    titleBarLeft.style.display = 'none';
                }
                if (windowControls) {
                    windowControls.style.display = 'none';
                }
            } else if (isWindows) {
                // Windows系统：显示窗口控制按钮，保持左侧标题
                if (windowControls) {
                    windowControls.style.display = 'flex';
                }
            }
        });
    }
}

module.exports = PlatformDetector;